import request from '@/utils/request'

// 查询卖家在线商品;参考AE-商品：发布产品信息（aliexpress.postproduct.redefining.postaeproduct）列表
export function listSellerStoreProduct(query) {
  return request({
    url: '/gather/seller/sellerStoreProduct/list',
    method: 'get',
    params: query
  })
}

// 查询卖家在线商品
export function getSellerStoreProduct(id) {
  return request({
    url: '/gather/seller/sellerStoreProduct/' + id,
    method: 'get'
  })
}

// 裂变
export function fission(query) {
  return request({
    url: '/gather/seller/sellerStoreProduct/fission',
    method: 'get',
    params: query
  })
}

// 上下架商品
export function productOfflineOrOnline(query) {
  return request({
    url: '/gather/AEProduct/productOfflineOrOnline',
    method: 'get',
    params: query
  })
}


// 查询采购价以及商品价格
export function getSkuPrice(query) {
  return request({
    url: '/gather/seller/sellerStoreProductSku/getSkuPrice',
    method: 'get',
    params: query
  })
}

// 查询商品规格
export function getSkuNameById(query) {
  return request({
    url: '/gather/seller/sellerStoreProduct/getSkuNameById',
    method: 'get',
    params: query
  })
}

// 提交测评
export function submitEvaluation(query) {
  return request({
    url: '/gather/gather/sellerStoreProductEvaluation/submit',
    method: 'post',
    data: query
  })
}


// 重新发布
export function restartPublish(query) {
  return request({
    url: '/gather/seller/sellerStoreProduct/restartpublish',
    method: 'get',
    params: query
  })
}

// 删除在线商品
export function storeProductDelete(id) {
  return request({
    url: '/gather/seller/sellerStoreProduct/' + id,
    method: 'delete'
  })
}


// 获取测评余额
export function getWalletExpend(data) {
  return request({
    url: '/wallet/seller/sellerStoreWalletExpend/getWalletExpend',
    method: 'get',
    params: data
  })
}

